import Vue from 'vue'
import Vuex from './vuex.esm.js'
import User from "./modules/User"
import Tab from './modules/Tab'
import NavBar from './modules/NavBar'
import Menu from "./modules/Menu"
import {LOADING,COMPLETE,LOGIN,LOGOUT} from './mutationTypes'

Vue.use(Vuex);

const state = {
  //主页面(content)是否加载中
  isLoading: false
};

const mutations = {
  /* 主内容开始加载 */
  [LOADING](state) {
    state.isLoading = true;
  },

  /* 主内容加载结束 */
  [COMPLETE](state) {
    state.isLoading = false;
  },
};

export default new Vuex.Store({
  state,
  mutations,
  modules: {User, Tab, NavBar, Menu}
});



// WEBPACK FOOTER //
// ./src/store/index.js
